.class public Lcom/xingbook/park/ui/LogoutDeviceView;
.super Lcom/xingbook/ui/XbLayout;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field public a:Lcom/xingbook/park/ui/y;

.field private d:Landroid/content/Context;

.field private e:Lcom/xingbook/park/ui/z;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    invoke-direct {p0, p1}, Lcom/xingbook/ui/XbLayout;-><init>(Landroid/content/Context;)V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/park/ui/LogoutDeviceView;->a:Lcom/xingbook/park/ui/y;

    new-instance v0, Lcom/xingbook/park/ui/z;

    invoke-direct {v0, p0}, Lcom/xingbook/park/ui/z;-><init>(Lcom/xingbook/park/ui/LogoutDeviceView;)V

    iput-object v0, p0, Lcom/xingbook/park/ui/LogoutDeviceView;->e:Lcom/xingbook/park/ui/z;

    iput-object p1, p0, Lcom/xingbook/park/ui/LogoutDeviceView;->d:Landroid/content/Context;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    invoke-direct {p0, p1, p2}, Lcom/xingbook/ui/XbLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/park/ui/LogoutDeviceView;->a:Lcom/xingbook/park/ui/y;

    new-instance v0, Lcom/xingbook/park/ui/z;

    invoke-direct {v0, p0}, Lcom/xingbook/park/ui/z;-><init>(Lcom/xingbook/park/ui/LogoutDeviceView;)V

    iput-object v0, p0, Lcom/xingbook/park/ui/LogoutDeviceView;->e:Lcom/xingbook/park/ui/z;

    iput-object p1, p0, Lcom/xingbook/park/ui/LogoutDeviceView;->d:Landroid/content/Context;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 1

    invoke-direct {p0, p1, p2, p3}, Lcom/xingbook/ui/XbLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/park/ui/LogoutDeviceView;->a:Lcom/xingbook/park/ui/y;

    new-instance v0, Lcom/xingbook/park/ui/z;

    invoke-direct {v0, p0}, Lcom/xingbook/park/ui/z;-><init>(Lcom/xingbook/park/ui/LogoutDeviceView;)V

    iput-object v0, p0, Lcom/xingbook/park/ui/LogoutDeviceView;->e:Lcom/xingbook/park/ui/z;

    iput-object p1, p0, Lcom/xingbook/park/ui/LogoutDeviceView;->d:Landroid/content/Context;

    return-void
.end method

.method static synthetic a(Lcom/xingbook/park/ui/LogoutDeviceView;)Landroid/content/Context;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/park/ui/LogoutDeviceView;->d:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic b(Lcom/xingbook/park/ui/LogoutDeviceView;)Lcom/xingbook/park/ui/z;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/park/ui/LogoutDeviceView;->e:Lcom/xingbook/park/ui/z;

    return-object v0
.end method


# virtual methods
.method public a(Ljava/lang/String;)V
    .locals 3

    if-eqz p1, :cond_0

    const-string v0, ""

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-virtual {p0}, Lcom/xingbook/park/ui/LogoutDeviceView;->getChildCount()I

    move-result v1

    if-lez v1, :cond_0

    const/4 v0, 0x0

    :goto_1
    if-ge v0, v1, :cond_0

    invoke-virtual {p0, v0}, Lcom/xingbook/park/ui/LogoutDeviceView;->getChildAt(I)Landroid/view/View;

    move-result-object v2

    invoke-virtual {v2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v2

    invoke-virtual {p1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_2

    invoke-virtual {p0, v0}, Lcom/xingbook/park/ui/LogoutDeviceView;->removeViewAt(I)V

    goto :goto_0

    :cond_2
    add-int/lit8 v0, v0, 0x1

    goto :goto_1
.end method

.method public a(Ljava/util/HashMap;Lcom/xingbook/ui/x;Landroid/app/Activity;)V
    .locals 17

    invoke-virtual/range {p0 .. p0}, Lcom/xingbook/park/ui/LogoutDeviceView;->removeAllViews()V

    new-instance v2, Lcom/xingbook/ui/t;

    move-object/from16 v0, p3

    move-object/from16 v1, p2

    invoke-direct {v2, v0, v1}, Lcom/xingbook/ui/t;-><init>(Landroid/app/Activity;Lcom/xingbook/ui/x;)V

    const-string v3, "\u7ed1\u5b9a\u8bbe\u5907\u8fbe\u5230\u4e0a\u9650"

    invoke-virtual {v2, v3}, Lcom/xingbook/ui/t;->setTitle(Ljava/lang/String;)V

    const v3, -0xe64c12

    invoke-virtual {v2, v3}, Lcom/xingbook/ui/t;->setBackgroundColor(I)V

    const/4 v3, 0x0

    const/4 v4, 0x0

    invoke-static/range {p3 .. p3}, Lcom/xingbook/c/n;->c(Landroid/app/Activity;)I

    move-result v5

    sget v6, Lcom/xingbook/ui/t;->b:I

    invoke-virtual {v2, v3, v4, v5, v6}, Lcom/xingbook/ui/t;->layout(IIII)V

    move-object/from16 v0, p0

    invoke-virtual {v0, v2}, Lcom/xingbook/park/ui/LogoutDeviceView;->addView(Landroid/view/View;)V

    invoke-static/range {p3 .. p3}, Lcom/xingbook/c/n;->f(Landroid/app/Activity;)F

    move-result v8

    const/high16 v2, 0x42c8

    mul-float/2addr v2, v8

    invoke-static {v2}, Ljava/lang/Math;->round(F)I

    move-result v9

    const/high16 v2, 0x41a0

    mul-float/2addr v2, v8

    invoke-static {v2}, Ljava/lang/Math;->round(F)I

    move-result v10

    const/high16 v2, 0x41a0

    mul-float/2addr v2, v8

    invoke-static {v2}, Ljava/lang/Math;->round(F)I

    move-result v11

    sget v3, Lcom/xingbook/ui/t;->b:I

    invoke-static/range {p3 .. p3}, Lcom/xingbook/c/n;->c(Landroid/app/Activity;)I

    move-result v2

    sub-int v12, v2, v10

    const/high16 v2, 0x41a0

    mul-float/2addr v2, v8

    invoke-static {v2}, Ljava/lang/Math;->round(F)I

    move-result v13

    const-string v4, "\u4eb2\uff0c\u60a8\u767b\u5f55\u7684\u8d26\u53f7\u5df2\u7ecf\u8fbe\u5230\u7ed1\u5b9a\u8bbe\u5907\u4e0a\u9650\u5566\uff0c\u8bf7\u60a8\u6ce8\u9500\u5176\u4ed6\u8bbe\u5907\u4e0a\u7684\u8d26\u53f7\u54e6~\u3002\u4ee5\u4e0b\u662f\u60a8\u53ef\u6ce8\u9500\u7684\u8bbe\u5907\uff1a"

    const/high16 v2, 0x4238

    mul-float/2addr v2, v8

    invoke-virtual {v4}, Ljava/lang/String;->length()I

    move-result v5

    int-to-float v5, v5

    mul-float/2addr v2, v5

    invoke-static/range {p3 .. p3}, Lcom/xingbook/c/n;->c(Landroid/app/Activity;)I

    move-result v5

    int-to-float v5, v5

    div-float/2addr v2, v5

    float-to-int v5, v2

    int-to-float v5, v5

    cmpl-float v5, v2, v5

    if-lez v5, :cond_0

    const/high16 v5, 0x4000

    add-float/2addr v2, v5

    :goto_0
    int-to-float v5, v3

    const/high16 v6, 0x4238

    mul-float/2addr v2, v6

    mul-float/2addr v2, v8

    add-float/2addr v2, v5

    div-int/lit8 v5, v11, 0x2

    int-to-float v5, v5

    add-float/2addr v2, v5

    float-to-int v2, v2

    new-instance v5, Landroid/widget/TextView;

    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/xingbook/park/ui/LogoutDeviceView;->d:Landroid/content/Context;

    invoke-direct {v5, v6}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    invoke-virtual {v5, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    sub-int v4, v12, v10

    invoke-virtual {v5, v4}, Landroid/widget/TextView;->setWidth(I)V

    sub-int v4, v2, v3

    invoke-virtual {v5, v4}, Landroid/widget/TextView;->setHeight(I)V

    const/16 v4, 0x13

    invoke-virtual {v5, v4}, Landroid/widget/TextView;->setGravity(I)V

    new-instance v4, Landroid/view/ViewGroup$LayoutParams;

    const/4 v6, -0x2

    const/4 v7, -0x1

    invoke-direct {v4, v6, v7}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V

    invoke-virtual {v5, v4}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    const v4, -0x99999a

    invoke-virtual {v5, v4}, Landroid/widget/TextView;->setTextColor(I)V

    const/4 v4, 0x0

    const/high16 v6, 0x4238

    mul-float/2addr v6, v8

    invoke-virtual {v5, v4, v6}, Landroid/widget/TextView;->setTextSize(IF)V

    invoke-virtual {v5, v10, v3, v12, v2}, Landroid/widget/TextView;->layout(IIII)V

    move-object/from16 v0, p0

    invoke-virtual {v0, v5}, Lcom/xingbook/park/ui/LogoutDeviceView;->addView(Landroid/view/View;)V

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/xingbook/park/ui/LogoutDeviceView;->d:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v14

    invoke-virtual/range {p1 .. p1}, Ljava/util/HashMap;->keySet()Ljava/util/Set;

    move-result-object v3

    invoke-interface {v3}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v15

    move v4, v2

    :goto_1
    invoke-interface {v15}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-nez v2, :cond_1

    invoke-static/range {p3 .. p3}, Lcom/xingbook/c/n;->d(Landroid/app/Activity;)I

    move-result v2

    sub-int/2addr v2, v9

    sub-int v11, v2, v11

    new-instance v2, Lcom/xingbook/ui/ad;

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/xingbook/park/ui/LogoutDeviceView;->d:Landroid/content/Context;

    invoke-direct {v2, v3}, Lcom/xingbook/ui/ad;-><init>(Landroid/content/Context;)V

    move-object/from16 v0, p0

    invoke-virtual {v2, v0}, Lcom/xingbook/ui/ad;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const/4 v3, 0x2

    invoke-virtual {v2, v3}, Lcom/xingbook/ui/ad;->setId(I)V

    const/high16 v3, 0x4120

    iput v3, v2, Lcom/xingbook/ui/ad;->j:F

    const-string v3, "\u7ee7\u7eed\u767b\u5f55"

    iput-object v3, v2, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    const/high16 v3, 0x4238

    mul-float/2addr v3, v8

    iput v3, v2, Lcom/xingbook/ui/ad;->c:F

    const/4 v3, -0x1

    iput v3, v2, Lcom/xingbook/ui/ad;->b:I

    const/4 v3, 0x0

    iput-object v3, v2, Lcom/xingbook/ui/ad;->f:Ljava/lang/String;

    const v3, -0x932fb9

    iput v3, v2, Lcom/xingbook/ui/ad;->i:I

    const/16 v3, 0x11

    iput v3, v2, Lcom/xingbook/ui/ad;->d:I

    const/4 v3, 0x0

    const/4 v4, 0x1

    const/4 v5, 0x1

    const/4 v6, 0x1

    const/4 v7, 0x1

    invoke-virtual/range {v2 .. v7}, Lcom/xingbook/ui/ad;->a(IIIII)V

    const/4 v3, 0x0

    iput v3, v2, Lcom/xingbook/ui/ad;->l:I

    const v3, -0xff9934

    invoke-virtual {v2, v3}, Lcom/xingbook/ui/ad;->setHilighted(I)V

    add-int v3, v11, v9

    invoke-virtual {v2, v10, v11, v12, v3}, Lcom/xingbook/ui/ad;->layout(IIII)V

    move-object/from16 v0, p0

    invoke-virtual {v0, v2}, Lcom/xingbook/park/ui/LogoutDeviceView;->addView(Landroid/view/View;)V

    return-void

    :cond_0
    const/high16 v5, 0x3f80

    add-float/2addr v2, v5

    goto/16 :goto_0

    :cond_1
    invoke-interface {v15}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    move-object v3, v2

    check-cast v3, Ljava/lang/String;

    add-int v16, v4, v11

    new-instance v2, Lcom/xingbook/ui/ad;

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/park/ui/LogoutDeviceView;->d:Landroid/content/Context;

    invoke-direct {v2, v4}, Lcom/xingbook/ui/ad;-><init>(Landroid/content/Context;)V

    move-object/from16 v0, p0

    invoke-virtual {v2, v0}, Lcom/xingbook/ui/ad;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const/4 v4, 0x1

    invoke-virtual {v2, v4}, Lcom/xingbook/ui/ad;->setId(I)V

    invoke-virtual {v2, v3}, Lcom/xingbook/ui/ad;->setTag(Ljava/lang/Object;)V

    move-object/from16 v0, p1

    invoke-virtual {v0, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    iput-object v3, v2, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    const/high16 v3, 0x4238

    mul-float/2addr v3, v8

    iput v3, v2, Lcom/xingbook/ui/ad;->c:F

    const v3, -0x99999a

    iput v3, v2, Lcom/xingbook/ui/ad;->b:I

    const-string v3, "\u6ce8\u9500"

    iput-object v3, v2, Lcom/xingbook/ui/ad;->f:Ljava/lang/String;

    const v3, -0xa5440a

    iput v3, v2, Lcom/xingbook/ui/ad;->g:I

    const/high16 v3, 0x4210

    mul-float/2addr v3, v8

    iput v3, v2, Lcom/xingbook/ui/ad;->h:F

    const v3, 0x7f020348

    invoke-static {v14, v3}, Lcom/xingbook/c/n;->a(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v3

    iput-object v3, v2, Lcom/xingbook/ui/ad;->m:Landroid/graphics/Bitmap;

    const/4 v3, -0x1

    iput v3, v2, Lcom/xingbook/ui/ad;->i:I

    const/high16 v3, 0x4120

    iput v3, v2, Lcom/xingbook/ui/ad;->j:F

    const/16 v3, 0x13

    iput v3, v2, Lcom/xingbook/ui/ad;->d:I

    const v3, -0x656566

    const/high16 v4, 0x41d0

    mul-float/2addr v4, v8

    invoke-static {v4}, Ljava/lang/Math;->round(F)I

    move-result v4

    const/high16 v5, 0x4240

    mul-float/2addr v5, v8

    invoke-static {v5}, Ljava/lang/Math;->round(F)I

    move-result v5

    const/4 v6, 0x1

    invoke-virtual {v2, v3, v4, v5, v6}, Lcom/xingbook/ui/ad;->a(IIII)V

    const v3, -0x777778

    const/4 v4, 0x1

    const/4 v5, 0x1

    const/4 v6, 0x1

    const/4 v7, 0x1

    invoke-virtual/range {v2 .. v7}, Lcom/xingbook/ui/ad;->a(IIIII)V

    iput v13, v2, Lcom/xingbook/ui/ad;->l:I

    const v3, -0x2a2a2b

    invoke-virtual {v2, v3}, Lcom/xingbook/ui/ad;->setHilighted(I)V

    add-int v3, v16, v9

    move/from16 v0, v16

    invoke-virtual {v2, v10, v0, v12, v3}, Lcom/xingbook/ui/ad;->layout(IIII)V

    move-object/from16 v0, p0

    invoke-virtual {v0, v2}, Lcom/xingbook/park/ui/LogoutDeviceView;->addView(Landroid/view/View;)V

    move v4, v3

    goto/16 :goto_1
.end method

.method public onClick(Landroid/view/View;)V
    .locals 4

    iget-object v0, p0, Lcom/xingbook/park/ui/LogoutDeviceView;->a:Lcom/xingbook/park/ui/y;

    if-eqz v0, :cond_0

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    const/4 v1, 0x1

    if-ne v0, v1, :cond_1

    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    new-instance v1, Landroid/app/ProgressDialog;

    iget-object v2, p0, Lcom/xingbook/park/ui/LogoutDeviceView;->d:Landroid/content/Context;

    invoke-direct {v1, v2}, Landroid/app/ProgressDialog;-><init>(Landroid/content/Context;)V

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/app/ProgressDialog;->setCancelable(Z)V

    const-string v2, "\u6b63\u5728\u6ce8\u9500..."

    invoke-virtual {v1, v2}, Landroid/app/ProgressDialog;->setMessage(Ljava/lang/CharSequence;)V

    invoke-virtual {v1}, Landroid/app/ProgressDialog;->show()V

    sget-object v2, Lcom/xingbook/c/o;->h:Ljava/util/concurrent/ExecutorService;

    new-instance v3, Lcom/xingbook/park/ui/x;

    invoke-direct {v3, p0, v0, v1}, Lcom/xingbook/park/ui/x;-><init>(Lcom/xingbook/park/ui/LogoutDeviceView;Ljava/lang/String;Landroid/app/ProgressDialog;)V

    invoke-interface {v2, v3}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    const/4 v1, 0x2

    if-ne v0, v1, :cond_0

    iget-object v0, p0, Lcom/xingbook/park/ui/LogoutDeviceView;->a:Lcom/xingbook/park/ui/y;

    invoke-interface {v0}, Lcom/xingbook/park/ui/y;->a()V

    goto :goto_0
.end method
